<?php
$connect = mysqli_connect('localhost','root','root','thinkcmf');
mysqli_set_charset($connect,'utf8');
if(!$connect){
    echo '数据库连接失败';
    die;
}

$id = $_GET['id'];

$sql = "select * from cmf_student where id = $id";

$res = mysqli_query($connect,$sql);

$data = mysqli_fetch_assoc($res);

if ($data) {
    echo json_encode(['code' => 1 , 'msg' => '学生信息', 'data' => $data ]);
}


?>

